<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>SpringBoot自动配置原理 | Finen&#39;s Blog</title>
    <meta name="generator" content="VuePress 1.4.1">
    <link rel="icon" href="/logo.png">
    <link rel="manifest" href="/manifest.json">
    <link rel="apple-touch-icon" href="/icons/apple-touch-icon-152x152.png">
    <link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#3eaf7c">
    <meta name="description" content="Stay Hungry! Stay Foolish!">
    <meta name="theme-color" content="#3eaf7c">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="msapplication-TileImage" content="/icons/msapplication-icon-144x144.png">
    <meta name="msapplication-TileColor" content="#000000">
    <link rel="preload" href="/assets/css/0.styles.331bc503.css" as="style"><link rel="preload" href="/assets/js/app.8657dc36.js" as="script"><link rel="preload" href="/assets/js/3.655fda8f.js" as="script"><link rel="preload" href="/assets/js/37.850783a5.js" as="script"><link rel="preload" href="/assets/js/11.32858d9c.js" as="script"><link rel="prefetch" href="/assets/js/1.af5e15a9.js"><link rel="prefetch" href="/assets/js/10.3d57a2e0.js"><link rel="prefetch" href="/assets/js/12.cef9d203.js"><link rel="prefetch" href="/assets/js/13.02beb1f0.js"><link rel="prefetch" href="/assets/js/14.7efc03c9.js"><link rel="prefetch" href="/assets/js/15.6bbbab3f.js"><link rel="prefetch" href="/assets/js/16.f90edb71.js"><link rel="prefetch" href="/assets/js/17.0d4d6c13.js"><link rel="prefetch" href="/assets/js/18.76dd8979.js"><link rel="prefetch" href="/assets/js/19.7da82e6f.js"><link rel="prefetch" href="/assets/js/20.55ee1642.js"><link rel="prefetch" href="/assets/js/21.088a02d1.js"><link rel="prefetch" href="/assets/js/22.73d5a697.js"><link rel="prefetch" href="/assets/js/23.829e24c3.js"><link rel="prefetch" href="/assets/js/24.2f258433.js"><link rel="prefetch" href="/assets/js/25.0a52df22.js"><link rel="prefetch" href="/assets/js/26.1c66cc2f.js"><link rel="prefetch" href="/assets/js/27.aa781144.js"><link rel="prefetch" href="/assets/js/28.b2cf7947.js"><link rel="prefetch" href="/assets/js/29.b61b1598.js"><link rel="prefetch" href="/assets/js/30.ba0ae8b1.js"><link rel="prefetch" href="/assets/js/31.7637d043.js"><link rel="prefetch" href="/assets/js/32.e552a016.js"><link rel="prefetch" href="/assets/js/33.334376b0.js"><link rel="prefetch" href="/assets/js/34.08c95f99.js"><link rel="prefetch" href="/assets/js/35.76b6b95d.js"><link rel="prefetch" href="/assets/js/36.539b6d80.js"><link rel="prefetch" href="/assets/js/38.06c33708.js"><link rel="prefetch" href="/assets/js/39.85fc61d5.js"><link rel="prefetch" href="/assets/js/4.12c21fd1.js"><link rel="prefetch" href="/assets/js/40.cdc93796.js"><link rel="prefetch" href="/assets/js/41.be79357e.js"><link rel="prefetch" href="/assets/js/42.e1ea76e5.js"><link rel="prefetch" href="/assets/js/43.06bf748b.js"><link rel="prefetch" href="/assets/js/44.ebd514b5.js"><link rel="prefetch" href="/assets/js/45.12908515.js"><link rel="prefetch" href="/assets/js/46.78fb0130.js"><link rel="prefetch" href="/assets/js/47.1a3b6cfd.js"><link rel="prefetch" href="/assets/js/48.ef04cdb5.js"><link rel="prefetch" href="/assets/js/49.763fd944.js"><link rel="prefetch" href="/assets/js/5.e50a6b6f.js"><link rel="prefetch" href="/assets/js/50.c8a7a24d.js"><link rel="prefetch" href="/assets/js/51.aaa9e6c7.js"><link rel="prefetch" href="/assets/js/52.7d3a85df.js"><link rel="prefetch" href="/assets/js/53.00784a7d.js"><link rel="prefetch" href="/assets/js/54.bd3845dd.js"><link rel="prefetch" href="/assets/js/55.10a67e4b.js"><link rel="prefetch" href="/assets/js/56.eb909b5a.js"><link rel="prefetch" href="/assets/js/57.4b821666.js"><link rel="prefetch" href="/assets/js/58.1db8af1f.js"><link rel="prefetch" href="/assets/js/59.d3045373.js"><link rel="prefetch" href="/assets/js/6.f25d4964.js"><link rel="prefetch" href="/assets/js/60.e1ccc619.js"><link rel="prefetch" href="/assets/js/61.eca4de24.js"><link rel="prefetch" href="/assets/js/62.be7238a5.js"><link rel="prefetch" href="/assets/js/63.a6ace044.js"><link rel="prefetch" href="/assets/js/64.bbd88e61.js"><link rel="prefetch" href="/assets/js/65.1f6c1848.js"><link rel="prefetch" href="/assets/js/66.d22e96e8.js"><link rel="prefetch" href="/assets/js/67.80ad6427.js"><link rel="prefetch" href="/assets/js/68.130aa1f6.js"><link rel="prefetch" href="/assets/js/69.4b778299.js"><link rel="prefetch" href="/assets/js/7.9c54e368.js"><link rel="prefetch" href="/assets/js/70.edcac904.js"><link rel="prefetch" href="/assets/js/71.90aa842c.js"><link rel="prefetch" href="/assets/js/72.4cb8aeae.js"><link rel="prefetch" href="/assets/js/73.6f272f7b.js"><link rel="prefetch" href="/assets/js/74.d36a7a16.js"><link rel="prefetch" href="/assets/js/75.362400fa.js"><link rel="prefetch" href="/assets/js/76.140673a6.js"><link rel="prefetch" href="/assets/js/77.5f1336bf.js"><link rel="prefetch" href="/assets/js/78.6105e050.js"><link rel="prefetch" href="/assets/js/79.dd680c04.js"><link rel="prefetch" href="/assets/js/8.786d8198.js"><link rel="prefetch" href="/assets/js/80.ebfb944f.js"><link rel="prefetch" href="/assets/js/81.892d344c.js"><link rel="prefetch" href="/assets/js/9.b0b77105.js">
    <link rel="stylesheet" href="/assets/css/0.styles.331bc503.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">Finen's Blog</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/post/" class="nav-link">
  文章
</a></div><div class="nav-item"><a href="/archives/" class="nav-link">
  归档
</a></div><div class="nav-item"><a href="/tags/" class="nav-link">
  标签云
</a></div><div class="nav-item"><a href="/friends/" class="nav-link">
  友人帐
</a></div> <a href="https://github.com/hirCodd" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/post/" class="nav-link">
  文章
</a></div><div class="nav-item"><a href="/archives/" class="nav-link">
  归档
</a></div><div class="nav-item"><a href="/tags/" class="nav-link">
  标签云
</a></div><div class="nav-item"><a href="/friends/" class="nav-link">
  友人帐
</a></div> <a href="https://github.com/hirCodd" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav>  <!----> </aside> <main class="page"> <div class="title-content"><div class="el-card box-cards is-never-shadow"><!----><div class="el-card__body"><h2>SpringBoot自动配置原理</h2> <div class="page-info"><i aria-hidden="true" class="el-icon-s-custom"></i> <span class="i-text">Finen</span> <i aria-hidden="true" class="el-icon-collection-tag"><span class="i-text">SpringBoot</span></i> <i aria-hidden="true" class="el-icon-time"></i> <span class="i-text">2019-02-26</span> <span id="/blog/java/springboot/auto-configuration.html" data-flag-title="SpringBoot自动配置原理" class="leancloud-visitors"><i aria-hidden="true" class="el-icon-view"></i> <i class="leancloud-visitors-count">1000000</i></span></div></div></div></div> <div class="theme-default-content content__default"><h2 id="_1-自动配置原理"><a href="#_1-自动配置原理" class="header-anchor">#</a> 1.自动配置原理</h2> <p>配置文件到底能写什么？怎么写？自动配置原理：</p> <p>配置文件能配置属性参照https://docs.spring.io/spring-boot/docs/2.1.3.RELEASE/reference/htmlsingle/#common-application-properties</p> <p>自动配置原理：</p> <p>1.SpringBoot启动的时候加载主配置类，并开启了自动配置@EnableAutoConfiguration</p> <p>2.@EnableAutoConfiguration作用：</p> <ul><li><p>利用AutoConfigurationImportSelector给容器中导入一些组件</p></li> <li><p>可以查看selectImports()方法的内容</p></li> <li></li></ul> <div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token class-name">List</span><span class="token generics"><span class="token punctuation">&lt;</span><span class="token class-name">String</span><span class="token punctuation">&gt;</span></span> configurations <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">getCandidateConfigurations</span><span class="token punctuation">(</span>annotationMetadata<span class="token punctuation">,</span> attributes<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>来获取候选的配置</p> <ul><li><div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token class-name">SpringFactoriesLoader</span><span class="token punctuation">.</span><span class="token function">loadFactoryNames</span><span class="token punctuation">(</span>）

扫描所有jar包的类路径下的META<span class="token operator">-</span>INF<span class="token operator">/</span>spring<span class="token punctuation">.</span>factories
把扫描到的这些文件的包装成properties对象
从properties中获取到<span class="token class-name">EnableAutoConfiguration</span><span class="token punctuation">.</span><span class="token keyword">class</span>类名对应的值，然后把他们添加在容器中
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div></li> <li><p>将类路径下meta-INF/spring.factories里面配置的所有</p></li></ul> <p>EnableAutoConfiguration的值添加到了容器中；</p> <div class="language-java line-numbers-mode"><pre class="language-java"><code>org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>admin<span class="token punctuation">.</span><span class="token class-name">SpringApplicationAdminJmxAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>aop<span class="token punctuation">.</span><span class="token class-name">AopAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>amqp<span class="token punctuation">.</span><span class="token class-name">RabbitAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>batch<span class="token punctuation">.</span><span class="token class-name">BatchAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>cache<span class="token punctuation">.</span><span class="token class-name">CacheAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>cassandra<span class="token punctuation">.</span><span class="token class-name">CassandraAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>cloud<span class="token punctuation">.</span><span class="token class-name">CloudServiceConnectorsAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>context<span class="token punctuation">.</span><span class="token class-name">ConfigurationPropertiesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>context<span class="token punctuation">.</span><span class="token class-name">MessageSourceAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>context<span class="token punctuation">.</span><span class="token class-name">PropertyPlaceholderAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>couchbase<span class="token punctuation">.</span><span class="token class-name">CouchbaseAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>dao<span class="token punctuation">.</span><span class="token class-name">PersistenceExceptionTranslationAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>cassandra<span class="token punctuation">.</span><span class="token class-name">CassandraDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>cassandra<span class="token punctuation">.</span><span class="token class-name">CassandraReactiveDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>cassandra<span class="token punctuation">.</span><span class="token class-name">CassandraReactiveRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>cassandra<span class="token punctuation">.</span><span class="token class-name">CassandraRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>couchbase<span class="token punctuation">.</span><span class="token class-name">CouchbaseDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>couchbase<span class="token punctuation">.</span><span class="token class-name">CouchbaseReactiveDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>couchbase<span class="token punctuation">.</span><span class="token class-name">CouchbaseReactiveRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>couchbase<span class="token punctuation">.</span><span class="token class-name">CouchbaseRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>elasticsearch<span class="token punctuation">.</span><span class="token class-name">ElasticsearchAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>elasticsearch<span class="token punctuation">.</span><span class="token class-name">ElasticsearchDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>elasticsearch<span class="token punctuation">.</span><span class="token class-name">ElasticsearchRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>jdbc<span class="token punctuation">.</span><span class="token class-name">JdbcRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>jpa<span class="token punctuation">.</span><span class="token class-name">JpaRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>ldap<span class="token punctuation">.</span><span class="token class-name">LdapRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>mongo<span class="token punctuation">.</span><span class="token class-name">MongoDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>mongo<span class="token punctuation">.</span><span class="token class-name">MongoReactiveDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>mongo<span class="token punctuation">.</span><span class="token class-name">MongoReactiveRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>mongo<span class="token punctuation">.</span><span class="token class-name">MongoRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>neo4j<span class="token punctuation">.</span><span class="token class-name">Neo4jDataAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>neo4j<span class="token punctuation">.</span><span class="token class-name">Neo4jRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>solr<span class="token punctuation">.</span><span class="token class-name">SolrRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>redis<span class="token punctuation">.</span><span class="token class-name">RedisAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>redis<span class="token punctuation">.</span><span class="token class-name">RedisReactiveAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>redis<span class="token punctuation">.</span><span class="token class-name">RedisRepositoriesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>rest<span class="token punctuation">.</span><span class="token class-name">RepositoryRestMvcAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>data<span class="token punctuation">.</span>web<span class="token punctuation">.</span><span class="token class-name">SpringDataWebAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>elasticsearch<span class="token punctuation">.</span>jest<span class="token punctuation">.</span><span class="token class-name">JestAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>elasticsearch<span class="token punctuation">.</span>rest<span class="token punctuation">.</span><span class="token class-name">RestClientAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>flyway<span class="token punctuation">.</span><span class="token class-name">FlywayAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>freemarker<span class="token punctuation">.</span><span class="token class-name">FreeMarkerAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>gson<span class="token punctuation">.</span><span class="token class-name">GsonAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>h2<span class="token punctuation">.</span><span class="token class-name">H2ConsoleAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>hateoas<span class="token punctuation">.</span><span class="token class-name">HypermediaAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>hazelcast<span class="token punctuation">.</span><span class="token class-name">HazelcastAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>hazelcast<span class="token punctuation">.</span><span class="token class-name">HazelcastJpaDependencyAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>http<span class="token punctuation">.</span><span class="token class-name">HttpMessageConvertersAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>http<span class="token punctuation">.</span>codec<span class="token punctuation">.</span><span class="token class-name">CodecsAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>influx<span class="token punctuation">.</span><span class="token class-name">InfluxDbAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>info<span class="token punctuation">.</span><span class="token class-name">ProjectInfoAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>integration<span class="token punctuation">.</span><span class="token class-name">IntegrationAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span><span class="token class-name">JacksonAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jdbc<span class="token punctuation">.</span><span class="token class-name">DataSourceAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jdbc<span class="token punctuation">.</span><span class="token class-name">JdbcTemplateAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jdbc<span class="token punctuation">.</span><span class="token class-name">JndiDataSourceAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jdbc<span class="token punctuation">.</span><span class="token class-name">XADataSourceAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jdbc<span class="token punctuation">.</span><span class="token class-name">DataSourceTransactionManagerAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jms<span class="token punctuation">.</span><span class="token class-name">JmsAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jmx<span class="token punctuation">.</span><span class="token class-name">JmxAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jms<span class="token punctuation">.</span><span class="token class-name">JndiConnectionFactoryAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jms<span class="token punctuation">.</span>activemq<span class="token punctuation">.</span><span class="token class-name">ActiveMQAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jms<span class="token punctuation">.</span>artemis<span class="token punctuation">.</span><span class="token class-name">ArtemisAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>groovy<span class="token punctuation">.</span>template<span class="token punctuation">.</span><span class="token class-name">GroovyTemplateAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jersey<span class="token punctuation">.</span><span class="token class-name">JerseyAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jooq<span class="token punctuation">.</span><span class="token class-name">JooqAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>jsonb<span class="token punctuation">.</span><span class="token class-name">JsonbAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>kafka<span class="token punctuation">.</span><span class="token class-name">KafkaAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>ldap<span class="token punctuation">.</span>embedded<span class="token punctuation">.</span><span class="token class-name">EmbeddedLdapAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>ldap<span class="token punctuation">.</span><span class="token class-name">LdapAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>liquibase<span class="token punctuation">.</span><span class="token class-name">LiquibaseAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>mail<span class="token punctuation">.</span><span class="token class-name">MailSenderAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>mail<span class="token punctuation">.</span><span class="token class-name">MailSenderValidatorAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>mongo<span class="token punctuation">.</span>embedded<span class="token punctuation">.</span><span class="token class-name">EmbeddedMongoAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>mongo<span class="token punctuation">.</span><span class="token class-name">MongoAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>mongo<span class="token punctuation">.</span><span class="token class-name">MongoReactiveAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>mustache<span class="token punctuation">.</span><span class="token class-name">MustacheAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>orm<span class="token punctuation">.</span>jpa<span class="token punctuation">.</span><span class="token class-name">HibernateJpaAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>quartz<span class="token punctuation">.</span><span class="token class-name">QuartzAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>reactor<span class="token punctuation">.</span>core<span class="token punctuation">.</span><span class="token class-name">ReactorCoreAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">SecurityAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">SecurityRequestMatcherProviderAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">UserDetailsServiceAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">SecurityFilterAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">ReactiveSecurityAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">ReactiveUserDetailsServiceAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>sendgrid<span class="token punctuation">.</span><span class="token class-name">SendGridAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>session<span class="token punctuation">.</span><span class="token class-name">SessionAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>oauth2<span class="token punctuation">.</span>client<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">OAuth2ClientAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>oauth2<span class="token punctuation">.</span>client<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">ReactiveOAuth2ClientAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>oauth2<span class="token punctuation">.</span>resource<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">OAuth2ResourceServerAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>security<span class="token punctuation">.</span>oauth2<span class="token punctuation">.</span>resource<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">ReactiveOAuth2ResourceServerAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>solr<span class="token punctuation">.</span><span class="token class-name">SolrAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>task<span class="token punctuation">.</span><span class="token class-name">TaskExecutionAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>task<span class="token punctuation">.</span><span class="token class-name">TaskSchedulingAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>thymeleaf<span class="token punctuation">.</span><span class="token class-name">ThymeleafAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>transaction<span class="token punctuation">.</span><span class="token class-name">TransactionAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>transaction<span class="token punctuation">.</span>jta<span class="token punctuation">.</span><span class="token class-name">JtaAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>validation<span class="token punctuation">.</span><span class="token class-name">ValidationAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>client<span class="token punctuation">.</span><span class="token class-name">RestTemplateAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>embedded<span class="token punctuation">.</span><span class="token class-name">EmbeddedWebServerFactoryCustomizerAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">HttpHandlerAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">ReactiveWebServerFactoryAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">WebFluxAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span>error<span class="token punctuation">.</span><span class="token class-name">ErrorWebFluxAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span>function<span class="token punctuation">.</span>client<span class="token punctuation">.</span><span class="token class-name">ClientHttpConnectorAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span>function<span class="token punctuation">.</span>client<span class="token punctuation">.</span><span class="token class-name">WebClientAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">DispatcherServletAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">ServletWebServerFactoryAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span>error<span class="token punctuation">.</span><span class="token class-name">ErrorMvcAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">HttpEncodingAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">MultipartAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>web<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">WebMvcAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>websocket<span class="token punctuation">.</span>reactive<span class="token punctuation">.</span><span class="token class-name">WebSocketReactiveAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>websocket<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">WebSocketServletAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>websocket<span class="token punctuation">.</span>servlet<span class="token punctuation">.</span><span class="token class-name">WebSocketMessagingAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>webservices<span class="token punctuation">.</span><span class="token class-name">WebServicesAutoConfiguration</span><span class="token punctuation">,</span>\
org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>webservices<span class="token punctuation">.</span>client<span class="token punctuation">.</span><span class="token class-name">WebServiceTemplateAutoConfiguration</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br><span class="line-number">91</span><br><span class="line-number">92</span><br><span class="line-number">93</span><br><span class="line-number">94</span><br><span class="line-number">95</span><br><span class="line-number">96</span><br><span class="line-number">97</span><br><span class="line-number">98</span><br><span class="line-number">99</span><br><span class="line-number">100</span><br><span class="line-number">101</span><br><span class="line-number">102</span><br><span class="line-number">103</span><br><span class="line-number">104</span><br><span class="line-number">105</span><br><span class="line-number">106</span><br><span class="line-number">107</span><br><span class="line-number">108</span><br><span class="line-number">109</span><br><span class="line-number">110</span><br><span class="line-number">111</span><br><span class="line-number">112</span><br><span class="line-number">113</span><br><span class="line-number">114</span><br><span class="line-number">115</span><br><span class="line-number">116</span><br><span class="line-number">117</span><br><span class="line-number">118</span><br></div></div><p>每一个这样的xxxAutoConfiguration类都是容器中的一个组件，都加入到容器中，用他们来做自动配置。</p> <p>3.每一个自动配置类来进行自动配置功能</p> <p>4,.以<strong>HttpEncodingAutoConfiguration</strong>为例解释自动配置原理</p> <div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token annotation punctuation">@Configuration</span> <span class="token comment">// 标识这个是一个配置类，以前编写的配置文件一样，也可以给容器中添加组件</span>
<span class="token annotation punctuation">@EnableConfigurationProperties</span><span class="token punctuation">(</span><span class="token punctuation">{</span><span class="token class-name">HttpProperties</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token comment">//启用ConfigurationProperties功能；将配置文件中对应的值进行绑定</span>
<span class="token annotation punctuation">@ConditionalOnWebApplication</span><span class="token punctuation">(</span> <span class="token comment">//Spring底层Condition注解，根据不同的条件，如果满足指定的条件，整个配置类里面的配置才会生效： 判断当前应用是不是web应用。如果是，当前配置类生效，不过不是配置类不生效。</span>
    type <span class="token operator">=</span> <span class="token class-name">Type</span><span class="token punctuation">.</span>SERVLET
<span class="token punctuation">)</span>
<span class="token annotation punctuation">@ConditionalOnClass</span><span class="token punctuation">(</span><span class="token punctuation">{</span><span class="token class-name">CharacterEncodingFilter</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token comment">//判断当前项目有没有这个类</span>
<span class="token annotation punctuation">@ConditionalOnProperty</span><span class="token punctuation">(</span>
    prefix <span class="token operator">=</span> <span class="token string">&quot;spring.http.encoding&quot;</span><span class="token punctuation">,</span>
    value <span class="token operator">=</span> <span class="token punctuation">{</span><span class="token string">&quot;enabled&quot;</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
    matchIfMissing <span class="token operator">=</span> <span class="token boolean">true</span>
<span class="token punctuation">)</span> <span class="token comment">//配置文件中是否存在某个配置，spring.http.encoding.enabled;如果不存在，判断也是成立的</span>
<span class="token comment">//即使配置文件中即使不配置spring.http.encoding.enabled=true;也是默认生效的额</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">HttpEncodingAutoConfiguration</span> <span class="token punctuation">{</span>
    <span class="token comment">// 它已经和springboot配置文件映射了</span>
    <span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Encoding</span> properties<span class="token punctuation">;</span>

    <span class="token comment">//只有一个参数构造器的情况下，参数的值就会从容器中拿</span>
    <span class="token keyword">public</span> <span class="token class-name">HttpEncodingAutoConfiguration</span><span class="token punctuation">(</span><span class="token class-name">HttpProperties</span> properties<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>properties <span class="token operator">=</span> properties<span class="token punctuation">.</span><span class="token function">getEncoding</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token annotation punctuation">@Bean</span> <span class="token comment">// 给容器中添加一个组件，这个组件的某些值需要从properties中获取</span>
    <span class="token annotation punctuation">@ConditionalOnMissingBean</span>
    <span class="token keyword">public</span> <span class="token class-name">CharacterEncodingFilter</span> <span class="token function">characterEncodingFilter</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token class-name">CharacterEncodingFilter</span> filter <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">OrderedCharacterEncodingFilter</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        filter<span class="token punctuation">.</span><span class="token function">setEncoding</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>properties<span class="token punctuation">.</span><span class="token function">getCharset</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">name</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        filter<span class="token punctuation">.</span><span class="token function">setForceRequestEncoding</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>properties<span class="token punctuation">.</span><span class="token function">shouldForce</span><span class="token punctuation">(</span>org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>http<span class="token punctuation">.</span><span class="token class-name">HttpProperties</span><span class="token punctuation">.</span><span class="token class-name">Encoding</span><span class="token punctuation">.</span><span class="token class-name">Type</span><span class="token punctuation">.</span>REQUEST<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        filter<span class="token punctuation">.</span><span class="token function">setForceResponseEncoding</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>properties<span class="token punctuation">.</span><span class="token function">shouldForce</span><span class="token punctuation">(</span>org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure<span class="token punctuation">.</span>http<span class="token punctuation">.</span><span class="token class-name">HttpProperties</span><span class="token punctuation">.</span><span class="token class-name">Encoding</span><span class="token punctuation">.</span><span class="token class-name">Type</span><span class="token punctuation">.</span>RESPONSE<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> filter<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br></div></div><p>根据当前不同的条件判断，决定这个配置类是否生效</p> <p>5.所有配置文件能配置的属性都是xxxproperties类中封装着，配置文件能配置什么就可以参照某一个功能对应这个属性类。</p> <div class="language-java line-numbers-mode"><pre class="language-java"><code>
<span class="token annotation punctuation">@ConfigurationProperties</span><span class="token punctuation">(</span>
    prefix <span class="token operator">=</span> <span class="token string">&quot;spring.http&quot;</span>  <span class="token comment">//从配置文件中获取指定的值和bean的属性进行绑定</span>
<span class="token punctuation">)</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">HttpProperties</span> <span class="token punctuation">{</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>精髓：</p> <p><strong>1.SpringBoot启动会自动加载大量的自动配置类</strong></p> <p><strong>2.我们需要的功能有没有SpringBoot默认的写好的自动配置类；</strong></p> <p><strong>3.我们再来看自动配置类中到底配置了那些组件；（只要我们要用的组件有，我们就不需要再来配置）</strong></p> <p><strong>4.给容器中自动配置类添加组件的时候，会从properties类中获取某些属性，我们就可以在配置文件中指定这些属性的值。</strong></p> <p>xxxAutoConfiguration：自动配置类：</p> <p>给容器中添加容器组件：</p> <p>xxxProperties</p> <h2 id="_2-细节"><a href="#_2-细节" class="header-anchor">#</a> 2.细节</h2> <h4 id="_1、-conditional派生注解（spring注解版原生的-conditional作用）"><a href="#_1、-conditional派生注解（spring注解版原生的-conditional作用）" class="header-anchor">#</a> 1、@Conditional派生注解（Spring注解版原生的@Conditional作用）</h4> <p>作用：必须是@Conditional指定的条件成立，才给容器中添加组件，配置配里面的所有内容才生效；</p> <table><thead><tr><th>@Conditional扩展注解</th> <th>作用（判断是否满足当前指定条件）</th></tr></thead> <tbody><tr><td>@ConditionalOnJava</td> <td>系统的java版本是否符合要求</td></tr> <tr><td>@ConditionalOnBean</td> <td>容器中存在指定Bean；</td></tr> <tr><td>@ConditionalOnMissingBean</td> <td>容器中不存在指定Bean；</td></tr> <tr><td>@ConditionalOnExpression</td> <td>满足SpEL表达式指定</td></tr> <tr><td>@ConditionalOnClass</td> <td>系统中有指定的类</td></tr> <tr><td>@ConditionalOnMissingClass</td> <td>系统中没有指定的类</td></tr> <tr><td>@ConditionalOnSingleCandidate</td> <td>容器中只有一个指定的Bean，或者这个Bean是首选Bean</td></tr> <tr><td>@ConditionalOnProperty</td> <td>系统中指定的属性是否有指定的值</td></tr> <tr><td>@ConditionalOnResource</td> <td>类路径下是否存在指定资源文件</td></tr> <tr><td>@ConditionalOnWebApplication</td> <td>当前是web环境</td></tr> <tr><td>@ConditionalOnNotWebApplication</td> <td>当前不是web环境</td></tr> <tr><td>@ConditionalOnJndi</td> <td>JNDI存在指定项</td></tr></tbody></table> <p><strong>自动配置类必须在一定的条件下才能生效；</strong></p> <p>我们怎么知道哪些自动配置类生效；</p> <p><strong>==我们可以通过启用  debug=true属性；来让控制台打印自动配置报告==</strong>，这样我们就可以很方便的知道哪些自动配置类生效；</p> <div class="language-java line-numbers-mode"><pre class="language-java"><code><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">=</span>
AUTO<span class="token operator">-</span><span class="token class-name">CONFIGURATION</span> REPORT
<span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">=</span>


<span class="token class-name">Positive</span> matches<span class="token operator">:</span>（自动配置类启用的）
<span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">-</span>

   <span class="token class-name">DispatcherServletAutoConfiguration</span> matched<span class="token operator">:</span>
      <span class="token operator">-</span> <span class="token annotation punctuation">@ConditionalOnClass</span> found required <span class="token keyword">class</span> <span class="token string">'org.springframework.web.servlet.DispatcherServlet'</span><span class="token punctuation">;</span> <span class="token annotation punctuation">@ConditionalOnMissingClass</span> did not find unwanted <span class="token keyword">class</span> <span class="token punctuation">(</span><span class="token class-name">OnClassCondition</span><span class="token punctuation">)</span>
      <span class="token operator">-</span> <span class="token annotation punctuation">@ConditionalOnWebApplication</span> <span class="token punctuation">(</span>required<span class="token punctuation">)</span> found <span class="token class-name">StandardServletEnvironment</span> <span class="token punctuation">(</span><span class="token class-name">OnWebApplicationCondition</span><span class="token punctuation">)</span>
        
    
<span class="token class-name">Negative</span> matches<span class="token operator">:</span>（没有启动，没有匹配成功的自动配置类）
<span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">-</span>

   <span class="token class-name">ActiveMQAutoConfiguration</span><span class="token operator">:</span>
      <span class="token class-name">Did</span> not match<span class="token operator">:</span>
         <span class="token operator">-</span> <span class="token annotation punctuation">@ConditionalOnClass</span> did not find required classes <span class="token string">'javax.jms.ConnectionFactory'</span><span class="token punctuation">,</span> <span class="token string">'org.apache.activemq.ActiveMQConnectionFactory'</span> <span class="token punctuation">(</span><span class="token class-name">OnClassCondition</span><span class="token punctuation">)</span>

   <span class="token class-name">AopAutoConfiguration</span><span class="token operator">:</span>
      <span class="token class-name">Did</span> not match<span class="token operator">:</span>
         <span class="token operator">-</span> <span class="token annotation punctuation">@ConditionalOnClass</span> did not find required classes <span class="token string">'org.aspectj.lang.annotation.Aspect'</span><span class="token punctuation">,</span> <span class="token string">'org.aspectj.lang.reflect.Advice'</span> <span class="token punctuation">(</span><span class="token class-name">OnClassCondition</span><span class="token punctuation">)</span>
        
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br></div></div></div> <footer class="page-edit"><!----> <!----></footer> <!---->  <div class="vcomment"><div id="vcomments"></div></div></main></div><div class="global-ui"><!----><!----></div></div>
    <script src="/assets/js/app.8657dc36.js" defer></script><script src="/assets/js/3.655fda8f.js" defer></script><script src="/assets/js/37.850783a5.js" defer></script><script src="/assets/js/11.32858d9c.js" defer></script>
  </body>
</html>
